﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Lg.Core.db
{
    public class Default
    {
        private static SqlHelper _sqlHelper = null;
        private static object locker = new object();
        /// <summary>
        /// 获取默认SqlHelper实例，并以单例模式存在
        /// </summary>
        public static SqlHelper sqlHelper
        {
            get
            {
                if (_sqlHelper == null)
                {
                    lock (locker)
                    {
                        if (_sqlHelper == null)
                        {
                            _sqlHelper = new SqlHelper();
                        }
                    }
                }
                return _sqlHelper;
            }
        }
    }
}
